<?php
// $Id: block.tpl.php,v 1.3 2007/08/07 08:39:36 goba Exp $
//dsm($form);
//dsm($event);
dsm($matches);
dsm($variables);
?>



<?php print $form ?>

<table>
<?php if ($series['nid'] > 0): ?>
  <tr>
    <th colspan = "13"><?php print $series['title']?></th>
  </tr>
  <?php endif; ?>
<?php if ($event['nid'] > 0): ?>
  <tr>
    <th colspan = "13"><?php print $event['title']?></th>
  </tr>
  <?php endif; ?>
<?php if (!(($series['nid'] > 0) OR ($event['nid'] > 0))): ?>
  <tr>
    <th colspan = "13"><?php print t('All events')?></th>
  </tr>
<?php endif; ?>
  <tr>
    <th>&nbsp;</th>
    <th colspan = "4"><?php print t('total')?></th>
    <th colspan = "4"><?php print t('home')?></th>
    <th colspan = "4"><?php print t('away')?></th>
  </tr>
  
  <tr>
    <th><?php print t('Player')?></th>
    <th><?php print t('P')?></th>
    <th><?php print t('W')?></th>
    <th ><?php print t('D')?></th>
    <th ><?php print t('L')?></th>
    <th><?php print t('P')?></th>
    <th><?php print t('W')?></th>
    <th ><?php print t('D')?></th>
    <th ><?php print t('L')?></th>
    <th><?php print t('P')?></th>
    <th><?php print t('W')?></th>
    <th ><?php print t('D')?></th>
    <th ><?php print t('L')?></th>
  </tr>
  <?php if ($event['count'] == 0): ?>
  <tr>
    <th colspan = "13"><?php print t('No matches')?></th>
  </tr>
  <?php elseif ($event['count'] > 0): ?>
  <?php $row = 1 ?>
  
  <?php foreach ($matches as $match): ?>
    <tr class='<?php print ($row % 2 == 0) ? 'odd' : 'even' ?>'>
        <td><?php print $match['nid']?></td>
    </tr>
    <?php $row++; ?>
  <?php endforeach; ?>
  <?php endif; ?>
</table>